package com.jmlee.mapper;


import com.jmlee.pojo.*;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
 * @Description
 * @Author jmLee
 * @Date 2021/3/1 23:44
 * @Version 1.0
 */
public interface AdminMapper {

    Admin selectAdminById(Long id);

    Admin selectAdminByName(String username);

    /**
     * 新增后台人员
     *
     * @param admin
     * @return
     */
    int selectAdminListCount(Admin admin);

    List<Admin> selectAdminList(Admin admin, RowBounds rowBounds);

    int AdminListCount(Admin admin);

    // 查询
    List<Admin> findAll(Admin admin);

//    // 新增
//    boolean addAdmin(Admin admin);

    /**
     * 新建
     *
     * @param admin
     * @return
     */
    Integer insertUserInfo(Admin admin);

    /**
     * 新增商家
     *
     * @param aShop
     * @return
     */
    int insertShop(AShop aShop);

    // 删除
    int deleteUser(Admin admin);


    // 修改提交
    Integer updateAdminSubmit(Admin admin);

    /**
     * 根据id查询用户信息
     */
    Admin queryAdminById(Long id);

    //查询用户名是否重复
    Admin checkName(String username);

    /**
     * 新增图片
     *
     * @param admin
     * @return
     */
    Integer insertAdminImg(Admin admin);


}
